import { createApp } from 'vue'
import  Pinia from './store/store'
import mitt from 'mitt'
import Router from "./router";
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/reset.css'
import * as Icons from '@ant-design/icons-vue'
import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'
// 全局注册


 

import './style.css'
import App from './App.vue'

const icons:any = Icons
const Mit = mitt()
const app = createApp(App)

//TypeScript注册
// 由于必须要拓展ComponentCustomProperties类型才能获得类型提示
declare module 'vue' {
  export interface ComponentCustomProperties {
    $Bus: typeof Mit
  }
}
//vue3挂载全局API
app.config.globalProperties.$Bus = Mit
for (const i in icons) {
  app.component(i, icons[i])
}
app.use(Pinia).use(Router).use(Antd).use(mavonEditor).mount('#app')


